An installation can run in one of two modes: 32-bit or 64-bit.
64-bit mode is selected if the user is running a 64-bit version of Windows and the system's processor architecture is included in the value of the ArchitecturesInstallIn64BitMode [Setup] section directive. Otherwise, 32-bit mode is used.
How do the two modes of installation differ? Primarily, the differences lie in where things are installed by default.
In 32-bit mode:
- The {sys} constant maps to the 32-bit System directory by default.
- The {pf} constant is equivalent to {pf32}.
- The {cf} constant is equivalent to {cf32}.
- [Registry] writes to the 32-bit view by default.
- The {reg:...} constant reads the 32-bit view by default.
- The Reg* [Code] support functions access the 32-bit view by default.
- The useapppaths flag of the [Icons] section reads the "App Paths" key in the 32-bit view of the registry.
- The regserver and regtypelib flags of the [Files] section load and register files inside a 32-bit process by default.
- The sharedfile flag of the [Files] section updates the "SharedDLLs" key in the 32-bit view of the registry by default.
- The Uninstall key is created in the 32-bit view of the registry.
In 64-bit mode:
- The {sys} constant maps to the 64-bit System directory by default when used in the [Dirs], [Files], [InstallDelete], [Run], [UninstallDelete], and [UninstallRun] sections. This is because Setup temporarily disables WOW64 file system redirection when files/directories are accessed by those sections. Elsewhere, the {sys} constant maps to the 32-bit System directory, as is normal in a 32-bit process.
- The {pf} constant is equivalent to {pf64}.
- The {cf} constant is equivalent to {cf64}.
- [Registry] writes to the 64-bit view by default.
- The {reg:...} constant reads the 64-bit view by default.
- The Reg* [Code] support functions access the 64-bit view by default.
- The useapppaths flag of the [Icons] section reads the "App Paths" key in the 64-bit view of the registry.
- The regserver and regtypelib flags of the [Files] section load and register files inside a 64-bit process by default.
- The sharedfile flag of the [Files] section updates the "SharedDLLs" key in the 64-bit view of the registry by default.
- The Uninstall key is created in the 64-bit view of the registry.